1. Field of the Invention
The invention relates to an adaptive interrupts coalescing system, particularly to an adaptive interrupts coalescing system with recognizing minimum delay packets.
2. Description of the Related Art
Referring to FIG. 1, it shows a conventional adaptive interrupts coalescing system. The conventional adaptive interrupts coalescing system 10 comprises a first calculating device 11, a timer 12, a second calculating device 13 and an interrupt controller 14. The first calculating device 11 is used for calculating packet information of a plurality of packets. The packet information of the packets comprise an amount of receiving data, an amount of transmitting data and an amount of total data of the packets, wherein the amount of total data is calculated according to the amount of receiving data and the amount of transmitting data. For example: the amount of total data=a×the amount of receiving data+b×the amount of transmitting data.
The timer 12 is used for providing a time signal to the second calculating device 13; for example, the timer 12 provides a time interval to the second calculating device 13. The second calculating device 13 is used for determining a coalescing interrupt number signal according to the packet information and the time interval. According to the coalescing interrupt number signal, the interrupt controller 14 transmits an interrupt control signal to a processor to process the packets so as to interrupt the coalescing processing when the amount of the packets is equal to the coalescing interrupt number.
Particularly, if the amount of total data is larger than a high threshold limit value, the coalescing interrupt number signal is determined to be a high coalescing interrupt number value (for example 40), i.e., if the amount of the packets is equal to the high coalescing interrupt number value, the interrupt controller 14 transmits an interrupt control signal to process 40 packets in coalesce. If the amount of total data of the packets is smaller than a high threshold limit value and larger than a low threshold limit value, the coalescing interrupt number signal is determined to be a middle coalescing interrupt number value (for example 15), i.e., if the amount of the packets is equal to the middle coalescing interrupt number value, the interrupt controller 14 transmits an interrupt control signal to process 15 packets in coalesce.
Similarly, if the amount of total data is smaller than a low threshold limit value, the coalescing interrupt number signal is determined to be a low coalescing interrupt number value (for example 5), i.e., if the amount of the packets is equal to the low coalescing interrupt number value, the interrupt controller 14 transmits an interrupt control signal to process 5 packets in coalesce.
Therefore, the conventional adaptive interrupts coalescing system 10 adjusts different coalescing interrupt numbers to interrupt coalescing processing according to the amount of data. However, some types of service field (TOS) is minimum delay, i.e., the packets of minimum delay must be processed immediately. In the conventional adaptive interrupts coalescing system 10, the packets of minimum delay will be processed in coalesce with other packets until the amount of packets is equal to the coalescing interrupt number. Therefore, the packets of minimum delay will cause unpredictable delay time so the average delay time is increased.
Consequently, there is an existing need for an adaptive interrupts coalescing system to solve the above-mentioned problem.